package cn.iocoder.yudao.module.system.dal.mysql.productionplanissued;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.productionplanissued.ProductionPlanIssuedDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.productionplanissued.vo.*;

/**
 * 生成计划下发批次 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface ProductionPlanIssuedMapper extends BaseMapperX<ProductionPlanIssuedDO> {

    default PageResult<ProductionPlanIssuedDO> selectPage(ProductionPlanIssuedPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ProductionPlanIssuedDO>()
                .eqIfPresent(ProductionPlanIssuedDO::getBatchNumber, reqVO.getBatchNumber())
                .betweenIfPresent(ProductionPlanIssuedDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ProductionPlanIssuedDO::getId));
    }

}
